-- GENERATED SPELL FOR [Infinite Saboteur] --


function spell0_18172(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18172', 619, 1)
end

function spell1_18172(pUnit, Event) --@Shadow Shield,n/a--
pUnit:FullCastSpellOnTarget(31976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18172', 30315, 1)
end

function spell2_18172(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18172', 517, 1)
end

function Sorts_18172(pUnit, Event)
local choix_sorts_18172 = math.random(0, 2)
if choix_sorts_18172 == 0 then
pUnit:RegisterEvent('spell0_18172', 1, 1)
end
if choix_sorts_18172 == 1 then
pUnit:RegisterEvent('spell1_18172', 1, 1)
end
if choix_sorts_18172 == 2 then
pUnit:RegisterEvent('spell2_18172', 1, 1)
end
end

function mob18172_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18172', math.random(1500, 3000), 1)
end

function mob18172_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18172_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18172_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18172, 1, 'mob18172_Action')
RegisterUnitEvent(18172, 2, 'mob18172_Leave')
RegisterUnitEvent(18172, 3, 'mob18172_Kill')
RegisterUnitEvent(18172, 4, 'mob18172_Die')
